package com.tedu.servies;


import com.tedu.mapper.CartItemMapper;
import com.tedu.mapper.ItemDescMapper;

import com.tedu.mapper.ItemMapper;
import com.tedu.pojo.Item;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ItemDescServies {

    @Autowired
    ItemDescMapper itemDescMapper;

    @Autowired
    ItemMapper itemMapper;

    @Autowired
    CartItemMapper cateMapper;


    public Item getItemById(String id) {

        Item itemDesc = itemMapper.selectById(id);

        System.out.println(itemDesc);
        return  itemDesc;
    }


    public List<Item> getItemByIDlist(List<Long> list){
        System.out.println("表");
        System.out.println(list);

        List<Item> itemslist = itemMapper.selectBatchIds(list);
        System.out.println(itemslist);
        return itemslist;
    }
}